package vcp.models;

import client.Message;
import control.SimpleClient;
import db.parking.beans.rates;
import vcp.common.AbstractModel;

/**
 * Rates Approval Model
 *
 */
public class RatesApprovalModel extends AbstractModel {

	/**
	 * get Modified Rates request 
	 */
	public void getModifiedRates() {
		client = SimpleClient.getInstance();
		client.addPropertyChangeListener(this);	
		Message msg = new Message(null,"GetModifiedRates");
		 try {
				client.sendToServer(msg);
		 }
		 catch (Exception ex)
		 {
			 System.out.println(ex.toString()+"Insert->GetModifiedRates");
		 }
	}

	

	/**
	 * approve Rate request
	 * @param bean
	 */
	public void approveRate(rates bean) {
		client = SimpleClient.getInstance();
		client.addPropertyChangeListener(this);	
		Message msg = new Message(bean,"ApproveRate");
		 try {
				client.sendToServer(msg);
		 }
		 catch (Exception ex)
		 {
			 System.out.println(ex.toString()+"Insert->ApproveRate");
		 }
	}

}
